package lp.xian.materials.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.domain.Supplier;
import lombok.Data;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 采购订单对象 lp_purchase
 *
 * @author ruoyi
 * @date 2023-08-06
 */
@Data
public class Purchase extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 采购订单 */
    private Integer purchaseId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String purchaseOrder;

    /** 采购类型 */
    @Excel(name = "采购类型")
    private Integer requisitionType;

    /** 供应商 */
    @Excel(name = "供应商")
    private Integer supplierId;

    /** 税率 */
    @Excel(name = "税率")
    private BigDecimal requisitionTableTax;

    /** 业务员 */
    @Excel(name = "业务员")
    private String purchasePerson;

    /** 订单日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date purchaseDate;

    /** 审核状态 */
    @Excel(name = "审核状态")
    private Integer auditStatus;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date auditTime;

    /** 审核人 */
    @Excel(name = "审核人")
    private String auditPerson;

    private Supplier supplier;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("purchaseId", getPurchaseId())
                .append("purchaseOrder", getPurchaseOrder())
                .append("requisitionType", getRequisitionType())
                .append("supplierId", getSupplierId())
                .append("requisitionTableTax", getRequisitionTableTax())
                .append("purchasePerson", getPurchasePerson())
                .append("purchaseDate", getPurchaseDate())
                .append("remark", getRemark())
                .append("auditStatus", getAuditStatus())
                .append("auditTime", getAuditTime())
                .append("auditPerson", getAuditPerson())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
